home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Pxlxplor.pxl
< prev
next >
Wrap
Text File
|
2000-12-23
|
10KB
|
304 lines
Initialize:
Title$ = "PiXCL + Win95/NT Explorer"
UseCaption(Title$)
UseCoordinates(PIXEL)
SetColorPalette(BITMAP)
UseBackground(TRANSPARENT,166,166,166)
DrawBackground
WinLocate(Title$,700,200,990,400,Res)
WinGetClientRect("",cx1,cy1,cx2,cy2)
DirGet(SourceDir$)
WinShow(Title$,TOPMOST,Res)
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("E&xit!",Leave,
ENDPOPUP,
"&Explorer",IGNORE,
"&DDE Init", Start_Explorer_DDE,
"&Requests",Requests_DDE,
"&FindFolder",FindFolder_DDE,
"&ExploreFolder",ExploreFolder_DDE,
"&ViewFolder",ViewFolder_DDE,
"F&indFile",FindFile_DDE,
ENDPOPUP,
"&Test Apps",IGNORE,
"&Access 97",Test_MSAccess,
"&Excel 97",Test_MSExcel,
"&Netscape",Test_Netscape,
ENDPOPUP)
ChangeMenuItem("&FindFolder",GRAY,Res)
ChangeMenuItem("F&indFile",GRAY,Res)
ChangeMenuItem("&ExploreFolder",GRAY,Res)
ChangeMenuItem("&ViewFolder",GRAY,Res)
Wait_for_Input:
WaitInput()
Leave: {time to clean up after ourselves...we MUST clear the channel or Explorer
is left hanging. Windows stil runs, but DDE inits fail, and rebooting is the only solution.}
If ChanNum <> 0 Then DDETerminate(ChanNum)
WinClose("Find: All Files",Res)
WaitInput(200)
WinExist("Find: All Files",Res)
If Res = 1 Then Goto Leave
End
Test_Netscape:
DDEInitiate("Netscape","WWW_OpenURL",ChanNum)
DDEExecute(ChanNum,"file:///F|/HTML/welcome.htm",Res)
Goto Wait_for_Input
Test_MSAccess:
DrawBackground
If ChanNum <> 0 Then DDETerminate(ChanNum)
DDEInitiate("MSAccess","System",ChanNum)
If ChanNum = 0
DrawText(10,10,"DDE initiate failed")
DrawText(10,25,"Access may need to be started.")
Else
DrawText(10,10,"DDE conversation initiated")
DDERequest(ChanNum,"Formats",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Access 'Formats' Items",Res)
DDERequest(ChanNum,"Status",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Access 'Status' Items",Res)
DDERequest(ChanNum,"SysItems",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'SysItems' Items",Res)
DDERequest(ChanNum,"Topics",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Access 'Topics' Items",Res)
Endif
Goto Wait_for_Input
Test_MSExcel:
DrawBackground
If ChanNum <> 0 Then DDETerminate(ChanNum)
DDEInitiate("Excel","System",ChanNum)
If ChanNum = 0
DrawText(10,10,"DDE initiate failed")
Else
DrawText(10,10,"DDE conversation initiated")
DDERequest(ChanNum,"Formats",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Formats' Items",Res)
{
DDERequest(ChanNum,"Help",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Help' Items",Res)
}
DDERequest(ChanNum,"Status",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Status' Items",Res)
{
DDERequest(ChanNum,"ReturnMessage",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'ReturnMessage' Items",Res)
}
DDERequest(ChanNum,"SysItems",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'SysItems' Items",Res)
{
DDERequest(ChanNum,"TopicItemList",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'TopicItemList' Items",Res)
}
DDERequest(ChanNum,"Topics",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Topics' Items",Res)
DDERequest(ChanNum,"Selection",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Selection' Items",Res)
DDERequest(ChanNum,"Protocols",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'Protocols' Items",Res)
DDERequest(ChanNum,"EditEnvItems",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel 'EditEnvItems' Items",Res)
DDETerminate(ChanNum)
DDEInitiate("Excel","[Book1]Sheet1",ChanNum)
DDERequest(ChanNum,"R1C1",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel cell contents",Res)
DDEPoke(ChanNum,"R1C2","More blah",Res)
DDERequest(ChanNum,"R1C2",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Excel cell contents",Res)
Endif
Goto Wait_for_Input
Start_Explorer_DDE:
DrawBackground
If ChanNum <> 0 Then DDETerminate(ChanNum)
DDEInitiate("Folders","AppProperties",ChanNum)
If ChanNum = 0
DrawText(10,10,"DDE initiate failed")
Else
DrawText(10,10,"DDE conversation initiated")
ChangeMenuItem("&DDE Init",GRAY,Res)
ChangeMenuItem("&FindFolder",ENABLE,Res)
ChangeMenuItem("F&indFile",ENABLE,Res)
ChangeMenuItem("&ExploreFolder",ENABLE,Res)
ChangeMenuItem("&ViewFolder",ENABLE,Res)
Endif
Goto Wait_for_Input
Requests_DDE:
DrawText(10,10,"DDE conversation initiated")
DDERequest(ChanNum,"Formats",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Formats' Items",Res)
DDERequest(ChanNum,"Help",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Help' Items",Res)
DDERequest(ChanNum,"Status",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Status' Items",Res)
DDERequest(ChanNum,"ReturnMessage",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'ReturnMessage' Items",Res)
DDERequest(ChanNum,"SysItems",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'SysItems' Items",Res)
DDERequest(ChanNum,"TopicItemList",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'TopicItemList' Items",Res)
DDERequest(ChanNum,"Topics",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Topics' Items",Res)
DDERequest(ChanNum,"Selection",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Selection' Items",Res)
DDERequest(ChanNum,"Protocols",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'Protocols' Items",Res)
DDERequest(ChanNum,"EditEnvItems",Res$)
If Res$ = "" Then Beep Res$ = "No Items listed"
MessageBox(OK,1,INFORMATION,Res$,"Explorer 'EditEnvItems' Items",Res)
Goto Wait_for_Input
FindFolder_DDE: {display the Find: All Files dialog from explorer}
{
DDEexec = [FindFolder("%l", %I)]
arg#1 = the start-in [path]directory string, no spaces; quotes not needed
arg#2 = string. If different from arg#1, takes precedence,
appears in the 'LookIn' edit control
}
UseCursor(WAIT)
DDEExecute(ChanNum,"[FindFolder( ,c:\windows\system )]",Res)
If Res = 0 Then DrawText(10,25,"DDE Exec failed.")
UseCursor(ARROW)
Goto Wait_for_Input
ExploreFolder_DDE: {display the Find: All Files dialog from explorer. }
{
arg#1 = [path]directory;
arg#2 = unknown
arg#3 = 0 | 1 ->Explorer window not visible | visible
}
UseCursor(WAIT)
DDEExecute(ChanNum,"[ExploreFolder(c:\windows\system, , 1)]",Res)
If Res = 0 Then DrawText(10,25,"DDE Exec failed.")
UseCursor(ARROW)
Goto Wait_for_Input
ViewFolder_DDE: {display the Find: All Files dialog from explorer. }
{arg#1 = [path]directory;
arg#2 = unknown at present. string ?
arg#3 = 0 ->Explorer not visible, 1-> explorer visible
}
UseCursor(WAIT)
DDEExecute(ChanNum,"[ViewFolder(c:\windows\system, 0, 1)]",Res)
If Res = 0 Then DrawText(10,25,"DDE Exec failed.")
UseCursor(ARROW)
Goto Wait_for_Input
FindFile_DDE: {display the Find: All Files dialog from explorer}
{arg#1 = start-in directory string, has to be valid directory eg \
on the C: drive. Don't seem able to set the start disk
to any other disk.
arg#2 = some number ?
}
UseCursor(WAIT)
DDEExecute(ChanNum,"[OpenFindFile(\,0)]",Res)
If Res = 0 Then DrawText(10,25,"DDE Exec failed.")
UseCursor(ARROW)
Goto Wait_for_Input
{
Notes on Explorer and DDE, after poking through the Registry.
Directory.shell
->command = C:\WINDOWS\Explorer.exe
->DDEexec = [FindFolder("%l", %I)]
-> application = Folders This is the DDE Service name.
-> topic = AppProperties
arg#1 = start directory string, "" means string or Item ?
arg#2 = unknown, suspect integer value
Drive.shell.find
->command = C:\WINDOWS\Explorer.exe
->DDEexec = [FindFolder("%l", %I)]
-> application = Folders
-> topic = AppProperties
findfile.shell.open
->command = C:\WINDOWS\Explorer.exe
->DDEexec = [OpenFindFile("%1", %I)]
-> application = Folders
-> topic = AppProperties
Folder.Shell.Explore:
->command = C:\WINDOWS\Explorer.exe /e,/idlist,%I,%L
->DDE exec = [ExploreFolder("%l", %I, %S)]
-> application = Folders
-> topic = AppProperties
Folder.Shell.Open
->command = C:\WINDOWS\Explorer.exe /idlist,%I,%L
%L has to be a directory
->DDEexec = [ViewFolder("%l", %I, %S)]
-> application = Folders
-> topic = AppProperties
}